package imy.virtual.touch;



import android.os.SystemClock;

import java.util.concurrent.ExecutorService;

import imy.virtual.touch.bean.GesturePoint;
import imy.virtual.touch.constant.MotionEventExt;
import imy.virtual.touch.interfaces.GestureInterface;
import imy.virtual.touch.service.GestureManagerService;

public final class GestureManager {

    private static GestureManager gCore = new GestureManager();




    public static GestureManager get() {
        return gCore;
    }

    public  void clicked(float x, float y ,int id){
        GesturePoint build = GesturePoint.Builder.builder(x, y, MotionEventExt.MOTION_CLICKED, id, SystemClock.uptimeMillis())
                .build();
        getService().onClicked(build);


    }
    public void clicked(float x,float y){
        clicked(x,y,0);
    }
    private GestureInterface getService() {
        return GestureManagerService.get();
    }
}
